home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / vol6n21.arc / MAINPROG.BAS < prev    next >
BASIC Source File  |  1987-11-17  |  1KB  |  47 lines

  1.  
  2.  
  3.  
  4. ' Mainprog.bas is the "main program" giving you an example of how to
  5. ' call subprograms.
  6.  
  7. ' The program calls two subprograms to find out if a color or monochrome
  8. ' monitor is active (Subprog1) and to find out if a Hercules adapter
  9. ' is in the system (Subprog2)
  10.  
  11. CALL Find.monitor(Monitor.segment%, Egamode%, Egacolumns%, Egarows%, Egastatus%, Egamem%)
  12. CALL Hercules.there(Hercules.status%)
  13.         
  14.     PRINT "The currently active monitor is on a ";
  15.     IF Monitor.segment% = &HB000 THEN
  16.       PRINT "monochrome adapter."
  17.     ELSE
  18.       PRINT "color graphics adapter."
  19.     END IF
  20.     
  21.     IF Egastatus% = -1 THEN
  22.       PRINT "There is no EGA or VGA card present."
  23.     ELSE
  24.     
  25.       IF Egastatus% > 9 THEN
  26.         A$ = "VGA "
  27.         Egastatus% = Egastatus% - 10' don't need the added 10 anymore
  28.       ELSE
  29.         A$ = "EGA "
  30.       END IF
  31.       
  32.       PRINT A$; "is present in ";
  33.       IF Egastatus% = 1 THEN PRINT "monochrome mode." ELSE PRINT "color mode."
  34.       PRINT "The current video mode is"; Egamode%
  35.       PRINT "The monitor is displaying"; Egacolumns%; "columns ";
  36.       PRINT "and"; Egarows%; "Rows."
  37.       PRINT A$; "card has"; Egamem%; "kbytes of memory."
  38.     END IF
  39.     PRINT
  40.     
  41.     IF Hercules.status% = 0 THEN
  42.       PRINT "There is no Hercules adapter in this system."
  43.     ELSE
  44.       PRINT "There is a Hercules or compatible adapter in this system."
  45.     END IF
  46.     
  47.